Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fix for material link error #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mnmly
Copy link

@mnmly mnmly commented Nov 23, 2024

Screenshot 2024-11-23 at 12 52 21

Fix for a bug introduced by PR127

If bpy.context.preferences.edit.material_link was set to "OBDATA", it fails. This commit formats the str into "DATA" so MaterialSlot can be assigned without throwing the TypeError.

Please refer to:
PreferenceEdit: https://docs.blender.org/api/4.3/bpy.types.PreferencesEdit.html#bpy.types.PreferencesEdit.material_link
Material Slot: https://docs.blender.org/api/current/bpy.types.MaterialSlot.html#bpy.types.MaterialSlot.link

@jesterKing
Copy link
Owner

Thank you! I'll check your PR over the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants